package edu.mama.college.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 用户
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class User {
    //ID
    private int id;
    //手机号
    private String mobile;
    //昵称
    private String nickname = "未设置";
    // 角色
    private String role = "USER";
    //头像
    private String avatar = "/upload/image/03b0d39583f48206768a7534e55bcpng";
    //密码
    @JsonIgnore
    private String password;
    //注册时间
    private Date registerTime;
    //最后登录时间
    private Date lastLoginTime;

    // 部分参数的构造方法需要自行定义
    public User(String mobile, String password) {
        this.mobile = mobile;
        this.password = password;
    }
}
